package com.tanjie.blackbean.system.admin.model.org;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;
import java.util.Date;

/**
 * 组织机构
 *
 * @author tanjie
 * @since 2022-04-19
 */
@Getter
@Setter
@ToString
@TableName("sys_org")
@Schema(name = "OrgPO", description = "组织机构")
public class OrgPO implements Serializable {

    private static final long serialVersionUID = 1L;

    @Schema(description = "主键")
    @TableId(value = "id", type = IdType.ASSIGN_UUID)
    private String id;

    @Schema(description = "组织名称")
    @TableField("`name`")
    private String name;

    @Schema(description = "父主键")
    @TableField("parent_id")
    private String parentId;

    @Schema(description = "组织全称")
    @TableField("full_name")
    private String fullName;

    @Schema(description = "组织机构树的深度")
    @TableField("layer")
    private Integer layer;

    @Schema(description = "排序")
    @TableField("sort")
    private Integer sort;

    @Schema(description = "备注")
    @TableField("remark")
    private String remark;

    @Schema(description = "创建时间")
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;

    @Schema(description = "更新时间")
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    @Schema(description = "创建人id")
    @TableField(value = "create_by", fill = FieldFill.INSERT)
    private String createBy;

    @Schema(description = "修改人id")
    @TableField(value = "update_by", fill = FieldFill.INSERT_UPDATE)
    private String updateBy;

}
